package com.fanshuai;

import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Paths;

public class Main {
    public static void main(String[] args) throws Exception {
        byte[] data = Files.readAllBytes(Paths.get("/Users/fanshuai/水浒求生记.txt"));
        String s = new String(data, "gb2312");

        byte[] content = s.getBytes(StandardCharsets.UTF_8);
        Files.write(Paths.get("/Users/fanshuai/水浒求生记2.txt"), content);
    }
}
